package oop4;

/**
 * @author oldliu
 * @since 1.0
 */
public class People {
    private String name;
    private final String sex;
    private int age;
    public People(){
        sex="男";
    }

    public People(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public People(String name, String sex) {
        this.name = name;
        this.sex = sex;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }



    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "人{" +
                "姓名='" + name + '\'' +
                ", 性别='" + sex + '\'' +
                ", 年龄=" + age +
                '}';
    }

    public static void main(String[] args) {
        People p=new People("小吴","女");
        System.out.println(p);
    }
}
